<?php
define("DB_HOST","localhost");//数据库主机
define("DB_USER","user");//用户账户
define("DB_PASS","123456");//用户密码
define("DB_NAME","review_app");//数据库名字
//新建连接
$conn = new mysqli(DB_HOST,DB_USER,DB_PASS,DB_NAME);
//检查连接是否成功。  如果失败 die（）函数终止脚本并输出错误信息
//如果连接成功，打印出"连接成功！"
if($conn -> connect_error){
    die("连接失败" . $conn -> connect_error);
}
echo"连接成功";
    ?>